Skip to content

fix(manual_assert): use multipart suggestion instead of simple span_suggestion #15226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Knotty123230
Copy link

@Knotty123230 Knotty123230 commented Jul 7, 2025

This PR updates the manual_assert lint to use multipart_suggestion instead of a single span_suggestion.

This change allows Clippy to properly apply suggestions when comments are present before or around the if-then-panic! block. It removes the @no-rustfix annotation in the corresponding UI test and updates the .stderr file accordingly.

Fixes: #13099
changelog: fix manual_assert lint suggestion format

…suggestion

This resolves rust-lang#13099 by converting the suggestion into a multipart suggestion, allowing rustfix to apply it correctly.
@rustbot
Copy link
Collaborator

rustbot commented Jul 7, 2025

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 7, 2025
@Knotty123230 Knotty123230 changed the title fix(clippy::manual_assert): use multipart_suggestion instead of span_… fix(manual_assert): use multipart suggestion instead of simple span_suggestion Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue: Fix auto-applicable lint suggestions by using multipart suggestions
3 participants